package com.lee.automode;

import org.springframework.stereotype.Component;

/**
 * @Description TODO
 * @Author winston
 * @DateTime 2022/2/21
 */
@Component("aa")
public class A {
    public A(){
        System.out.println("default construct");
    }



    public A(C c){
        System.out.println("construct with C");
    }

    public A(B b){
        System.out.println("construct with B");
    }

    // autoMode(3)时, 默认使用最长的构造方法, 前提是构造方法的参数相对应的实例能够在spring容器中找到, 例如有B, 和C.
    public A(B b, C c) {
        System.out.println("construct with B, C");
    }


}
